package com.zjxny.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;
import xyz.erupt.annotation.Erupt;
import xyz.erupt.annotation.EruptField;
import xyz.erupt.annotation.sub_erupt.LinkTree;
import xyz.erupt.annotation.sub_erupt.Power;
import xyz.erupt.annotation.sub_field.Edit;
import xyz.erupt.annotation.sub_field.EditType;
import xyz.erupt.annotation.sub_field.View;
import xyz.erupt.annotation.sub_field.sub_edit.ChoiceType;
import xyz.erupt.annotation.sub_field.sub_edit.DateType;
import xyz.erupt.annotation.sub_field.sub_edit.ReferenceTreeType;
import xyz.erupt.annotation.sub_field.sub_edit.Search;
import xyz.erupt.upms.handler.DictCodeChoiceFetchHandler;
import xyz.erupt.upms.model.base.HyperModel;

@Setter
@Getter
@Entity
@Table(name = "traffic_detail")
@Erupt(name = "违章信息", linkTree = @LinkTree(field = "accountInfo"),power = @Power(add = false, delete = false, 
edit = false, query = true, 
importable = false, export = false))
public class TrafficDetail extends HyperModel {

	private static final long serialVersionUID = -8563766610675749392L;

	@EruptField(views = @View(title = "所属公司", column = "title"), edit = @Edit(title = "所属公司", type = EditType.REFERENCE_TREE, referenceTreeType = @ReferenceTreeType(pid = "parent.id", label = "title")))
	@ManyToOne
	AccountInfo accountInfo;

	@EruptField(views = @View(title = "违法描述"), edit = @Edit(show = false, title = "违法描述"))
	private String wfms;// "驾驶校车、中型以上载客载货汽车、危险物品运输车辆以外的机动车在高速公路、城市快速路以外的道路上行驶超过规定时速百分之二十以上未达到百分之五十的",

	@EruptField(views = @View(title = "罚款金额"), edit = @Edit(show = false, title = "罚款金额"))
	private String fkje;// "150",

	@EruptField(views = @View(title = "记分值"), edit = @Edit(show = false, title = "记分值"))
	private String wfjfs;// "3",

	@EruptField(views = @View(title = "违法状态"), edit = @Edit(show = false, title = "违法状态"))
	private String wfzt;// null,

	@EruptField(views = @View(title = "序号"), edit = @Edit(show = false, title = "序号"))
	private String xh;// "4419247900410663",

	@EruptField(views = @View(title = "号牌种类"), edit = @Edit(show = false, title = "号牌种类"))
	private String hpzl;// "52",
	
	@EruptField(views = @View(title = "号牌种类"), edit = @Edit(show = false, title = "号牌种类"))
	@Column(name = "hpzl_str", columnDefinition="varchar(20)")
	private String hpzlStr;// "小型新能源汽车",

	@EruptField(views = @View(title = "号牌号码"), edit = @Edit(show = false, title = "号牌号码",search=@Search(vague=true)))
	private String hphm;// "粤BDA2028",

	@EruptField(views = @View(title = "fzjg"), edit = @Edit(show = false, title = "fzjg"))
	private String fzjg;// null,

	@EruptField(views = @View(title = "违法地址"), edit = @Edit(show = false, title = "违法地址"))
	private String wfdz;// "S122省道50公里100米",

	@EruptField(views = @View(title = "wfxw"), edit = @Edit(show = false, title = "wfxw"))
	private String wfxw;// null,

	@EruptField(views = @View(title = "交罚标记"), edit = @Edit(show = false, title = "交罚标记"))
	private String jkbj;// null,
	
	@EruptField(views = @View(title = "交罚标记"), edit = @Edit(show = false, title = "交罚标记"))
	@Column(name = "jkbj_str", columnDefinition="varchar(20)")
	private String jkbjStr;// null,
	
	@EruptField(views = @View(title = "cjjg"), edit = @Edit(show = false, title = "cjjg"))
	private String cjjg;// null,

	@EruptField(views = @View(title = "cjjgmc"), edit = @Edit(show = false, title = "cjjgmc"))
	private String cjjgmc;// "东莞市公安局交通警察支队茶山大队",

	@EruptField(views = @View(title = "fsjg"), edit = @Edit(show = false, title = "fsjg"))
	private String fsjg;// null,

	@EruptField(views = @View(title = "jsjg"), edit = @Edit(show = false, title = "jsjg"))
	private String jsjg;// null,

	@EruptField(views = @View(title = "gxsj"), edit = @Edit(show = false, title = "gxsj"))
	private String gxsj;// null,

	@EruptField(views = @View(title = "dcbj"), edit = @Edit(show = false, title = "dcbj"))
	private String dcbj;// null,

	@EruptField(views = @View(title = "违法时间"), edit = @Edit(show = false, title = "违法时间"))
	private String wfsj;// "2023-06-29 10:33",

	@EruptField(views = @View(title = "处理时间"), edit = @Edit(show = false, title = "处理时间",search=@Search(vague=true),type = EditType.DATE, dateType = @DateType(type = DateType.Type.DATE)))
	private String clsj;// null,

	@EruptField(views = @View(title = "处理标记"), edit = @Edit(show = false, title = "处理标记",search=@Search
			,type = EditType.CHOICE
			,choiceType=@ChoiceType(fetchHandler = DictCodeChoiceFetchHandler.class,fetchHandlerParams = {"traffic_clbj"} )))
	private String clbj;// "0",
	
	@EruptField(views = @View(title = "处理标记"), edit = @Edit(show = false, title = "处理标记"))
	@Column(name = "clbj_str", columnDefinition="varchar(20)")
	private String clbjStr;// null,

	@EruptField(views = @View(title = "cljg"), edit = @Edit(show = false, title = "cljg"))
	private String cljg;// null,

	@EruptField(views = @View(title = "cljgmc"), edit = @Edit(show = false, title = "cljgmc"))
	private String cljgmc;// null,

	@EruptField(views = @View(title = "cljg1"), edit = @Edit(show = false, title = "cljg1"))
	private String cljg1;// null,

	@EruptField(views = @View(title = "cljg2"), edit = @Edit(show = false, title = "cljg2"))
	private String cljg2;// null,

	@EruptField(views = @View(title = "wrapStr"), edit = @Edit(show = false, title = "wrapStr"))
	@Column(name = "wrap_str", columnDefinition="varchar(20)")
	private String wrapStr;// null,

	@EruptField(views = @View(title = "wrapCljg"), edit = @Edit(show = false, title = "wrapCljg"))
	@Column(name = "wrap_cljg", columnDefinition="varchar(20)")
	private String wrapCljg;// null,

	@EruptField(views = @View(title = "fzjgStr"), edit = @Edit(show = false, title = "fzjgStr"))
	@Column(name = "fzjg_str", columnDefinition="varchar(20)")
	private String fzjgStr;// null,

	@EruptField(views = @View(title = "sfjf"), edit = @Edit(show = false, title = "sfjf"))
	private String sfjf;// null,

	@EruptField(views = @View(title = "sfcl"), edit = @Edit(show = false, title = "sfcl"))
	private String sfcl;// null,

	@EruptField(views = @View(title = "photos"), edit = @Edit(show = false, title = "photos"))
	@Column(name = "photos", columnDefinition="text")
	private String photos;// null

	@EruptField(views = @View(title = "wfxcsq"), edit = @Edit(show = false, title = "wfxcsq"))
	private String wfxcsq;// null,

	@EruptField(views = @View(title = "sfyss"), edit = @Edit(show = false, title = "sfyss"))
	private String sfyss;// "0",

	@EruptField(views = @View(title = "scz"), edit = @Edit(show = false, title = "scz"))
	private String scz;// null,

	@EruptField(views = @View(title = "bzz"), edit = @Edit(show = false, title = "bzz"))
	private String bzz;// null,

	@EruptField(views = @View(title = "swjgbj"), edit = @Edit(show = false, title = "swjgbj"))
	private String swjgbj;// "0",

	@EruptField(views = @View(title = "glbm"), edit = @Edit(show = false, title = "glbm"))
	private String glbm;// null,

	@EruptField(views = @View(title = "jdsbh"), edit = @Edit(show = false, title = "jdsbh"))
	private String jdsbh;// null
}